<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" data-rule="required" data-source="category/selectpage" data-params='{"custom[type]":"goods"}' class="form-control selectpage" name="row[category_id]" type="text" value="{$row.category_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Store_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-store_count" data-rule="required" class="form-control" name="row[store_count]" type="number" value="{$row.store_count}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Market_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-market_price" data-rule="required" class="form-control" step="0.01" name="row[market_price]" type="number" value="{$row.market_price}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shop_price" data-rule="required" class="form-control" step="0.01" name="row[shop_price]" type="number" value="{$row.shop_price}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Exchange_integral')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-exchange_integral" data-rule="required" class="form-control" name="row[exchange_integral]" type="number" value="{$row.exchange_integral}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" data-rule="" class="form-control" size="50" name="row[image]" type="text" value="{$row.image}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" data-rule="" class="form-control" size="50" name="row[images]" type="text" value="{$row.images}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Give_integral')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-give_integral" data-rule="required" class="form-control" name="row[give_integral]" type="number" value="{$row.give_integral}">
        </div>
    </div>
    
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Prom_type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-prom_type" data-rule="" class="form-control selectpicker" name="row[prom_type]">
                {foreach name="promTypeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.prom_type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Prom_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-prom_id" data-rule="" data-source="prom/index" class="form-control selectpage" name="row[prom_id]" type="text" value="{$row.prom_id}">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>

        <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('规格')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <!-- <input id="c-attr_id" data-rule="required" data-source="goodshandle/attr/selectpage" class="form-control selectpage" name="attr_id" type="text" value=""> -->

            <select  id="c-attr_id" data-rule="" class="form-control" name="attr_id">
                
                    <!-- <option value="0" ></option> -->

                    {volist name="attr" id="vo"}
                    <option value="{$vo.id}" {if condition="$vo.id eq $attrId"}selected{/if} >{$vo.name}</option>
                    {/volist}
                
            </select>

        </div>

        
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('规格值')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="col-xs-12 col-sm-8">
            
            <div class="checkbox" id="checkbox-values">
            {volist name="goodsattr" id="vo"}
             <label for="row[hobbydata][]-{$key}"><input id="row[hobbydata][]-{$key}" name="row[hobbydata][]" type="checkbox" value="{vo}" {if condition="in_array($vo,$attrData)"}checked{/if}/> </label> 
            {/volist}
           


            
            </div>

        </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
